package com.ctcemti.mdm.project.sys.dao;

import com.ctcemti.mdm.project.sys.entity.OrgOrganization;
import com.ctcemti.mdm.project.sys.entity.OrgPerson;
import com.ctcemti.mdm.project.sys.entity.OrgPersonDomain;
import com.ctcemti.mdm.project.sys.entity.OrgRole;
import com.ctcemti.mdm.project.sys.entity.OrgOrganization;
import com.ctcemti.mdm.project.sys.entity.OrgPerson;
import com.ctcemti.mdm.project.sys.entity.OrgPersonDomain;
import com.ctcemti.mdm.project.sys.entity.OrgRole;
import org.apache.ibatis.annotations.Mapper;
import tk.mybatis.mapper.common.IdsMapper;

import java.util.List;
import java.util.Map;

/**
 * @ClassName InfDisciplinesMapper
 * @Description 专业领域控制层
 * @Author pzw
 * @Date 11:20 2019/7/16
 * @Version V1.0
 **/
@Mapper
public interface OrgPersonMapper extends tk.mybatis.mapper.common.Mapper<OrgPerson>,IdsMapper<OrgPerson>{

    List<OrgPerson> selectAllOrgPerson(OrgPerson orgPerson);

    int updateOrgPerson(OrgPerson orgPerson);

    int hasOrgPerson(OrgPerson orgPerson);

    List<OrgOrganization> selectOrgTree(List<OrgOrganization> list);

    List<OrgOrganization> selectOrgTreeByAdmin();

    void insertOrgRerson(OrgPerson orgPerson);

    void deleteRelOrg(String[] ids);

    int moveOrgPerson(List<OrgPersonDomain> list);

    void insertBatch(List<OrgPerson> var);

    void insertRelBatch(List<OrgPerson> var);

    List<OrgPerson> selectAllOrgPersonNoRoleOrHasRole(Map<String,Object> map);

    void insertRelRole(List<OrgPersonDomain> orgPerson);

    void deleteRelRole(String[] ids);

    List<OrgRole> selectOrgRole(OrgPerson orgPerson);

    List<OrgRole> selectRoleyRersonId(String s);

    /* *
     * @Author bxf
     * @Description 根据登录人获取所有项目部
     * @Date 16:35 2019/11/19
     * @param s
     * @return java.util.List<java.lang.String>
     */
    List<String> selectOrgIdByLoginId(List<String> s);

    List<String> selectOrgIdByAdmin(String s);
}